/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package zabalza;

import Persistencia.DAOFactory;
import Persistencia.Entidades.BoletaSenasa;
import Persistencia.Entidades.PagoSenasa;
import java.util.ArrayList;
import java.util.List;
import utilidades.FormatDateString;

/**
 *
 * @author zeta
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       DAOFactory DAO = DAOFactory.getDAOFactory(DAOFactory.ORACLE);
      // BoletaSenasa bolSenasa = new BoletaSenasa(1234567,"Arancel", new Float(123.2) , false, FormatDateString.deStringDate("12/03/2010"));

       //BoletaSenasa bolSenasa2 = new BoletaSenasa(1234568,"Arancel", new Float(54.25) , false, FormatDateString.deStringDate("12/03/2010"));
       //BoletaSenasa bolSenasa3 = new BoletaSenasa(1234569,"Arancel", new Float(123.2) , false, FormatDateString.deStringDate("12/03/2010"));
       //DAO.getBoletaSenasaDAO().insertBoletaSenasa(bolSenasa);
       //DAO.getBoletaSenasaDAO().insertBoletaSenasa(bolSenasa3);
       //DAO.getBoletaSenasaDAO().insertBoletaSenasa(bolSenasa2);
       //List<BoletaSenasa>  boletasSenasaList = new ArrayList<BoletaSenasa>();
       //boletasSenasaList.add(DAO.getBoletaSenasaDAO().getBoletaSenasa(1234567,false));
       //boletasSenasaList.add(DAO.getBoletaSenasaDAO().getBoletaSenasa(1234568,false));
       //boletasSenasaList.add(DAO.getBoletaSenasaDAO().getBoletaSenasa(1234569,false));

       //PagoSenasa pago = new PagoSenasa(1041, FormatDateString.deStringDate("15/03/2010"),boletasSenasaList);
       PagoSenasa pago = DAO.getPagoSenasaDAO().getPagoSenasa(1041);
       //DAO.getPagoSenasaDAO().insertPagoSenasa(pago);
DAO.getPagoSenasaDAO().cancelPagoSenasa(pago, FormatDateString.deStringDate("28/03/2010"));

DAO.getPagoSenasaDAO().deletePagoSenasa(pago);
      DAO.getBoletaSenasaDAO().getAllBoletasSenasa(pago,true);

    }

}
